package com.mengshu.platform.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.mengshu.mybatisplus.basic.BasicPO;
import com.mengshu.platform.enums.AdminMenuTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 *     菜单
 * </p>
 *
 * @author liuning
 * @date 4:11 下午 2022/2/2
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName(value = "admin_menu", autoResultMap = true)
public class AdminMenuPO extends BasicPO implements Serializable {
    private static final long serialVersionUID = 3675212947260933940L;

    /**
     * 父菜单ID
     */
    private Long parentId;
    /**
     * 菜单名
     */
    @NotBlank(message = "菜单名不能为空")
    private String name;
    /**
     * 菜单类型
     */
    @NotNull(message = "菜单类型不能为空")
    private AdminMenuTypeEnum type;
    /**
     * 授权标识
     */
    private String permission;
    /**
     * 访问路径
     */
    private String path;
    /**
     * 图标
     */
    private String icon;
    /**
     * 级别
     */
    private Integer level;
    /**
     * 是否叶子节点
     */
    private Boolean leaf;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 是否启用
     */
    private Boolean enable;
    /**
     * 扩展字段
     */
    private String ext;
}
